<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <base data-ice="baseUrl" href="../../">
  <title data-ice="title">app/router.js | API Document</title>
  <link type="text/css" rel="stylesheet" href="css/style.css">
  <link type="text/css" rel="stylesheet" href="css/prettify-tomorrow.css">
  <script src="script/prettify/prettify.js"></script>
  
  
  <script src="script/manual.js"></script>
</head>
<body class="layout-container" data-ice="rootContainer">

<header>
  <a href="./">Home</a>
  
  <a href="identifiers.html">Reference</a>
  <a href="source.html">Source</a>
  
  
  <div class="search-box">
  <span>
    <img src="./image/search.png">
    <span class="search-input-edge"></span><input class="search-input"><span class="search-input-edge"></span>
  </span>
    <ul class="search-result"></ul>
  </div>
</header>

<nav class="navigation" data-ice="nav"><div>
  <ul>
    
  </ul>
</div>
</nav>

<div class="content" data-ice="content"><h1 data-ice="title">app/router.js</h1>
<pre class="source-code line-number raw-source-code"><code class="prettyprint linenums" data-ice="content">&apos;use strict&apos;;

module.exports = app =&gt; {
  // &#x9875;&#x9762;&#x8DEF;&#x7531;
  app.get(&apos;/&apos;, &apos;web.home.index&apos;);
  app.get(&apos;/login&apos;, &apos;web.user.login&apos;);
  app.get(&apos;/register&apos;, &apos;web.user.register&apos;);

  // &#x63A5;&#x53E3;&#x8DEF;&#x7531; user
  app.get(&apos;/api/user&apos;, &apos;api.user.find&apos;);
  app.post(&apos;/api/user/register&apos;, &apos;api.user.register&apos;);
  app.post(&apos;/api/user/login&apos;, &apos;api.user.login&apos;);
  app.get(&apos;/api/user/isLogin&apos;, &apos;api.user.isLogin&apos;);

  //space &#x63A5;&#x53E3;&#x8DEF;&#x7531;
  app.resources(&apos;space&apos;, &apos;/api/space&apos;, &apos;api.space&apos;);
  app.post(&apos;/api/space/addUserSpace&apos;, &apos;api.space.addUserSpace&apos;);
  app.get(&apos;/api/space/listUserSpace&apos;, &apos;api.space.listUserSpace&apos;);
  app.post(&apos;/api/space/addRole&apos;, &apos;api.space.addRole&apos;);
  app.get(&apos;/api/space/listRole&apos;, &apos;api.space.listRole&apos;);
  //&#x673A;&#x6784;&#x4E0B;&#x7528;&#x6237;&#x7684;&#x89D2;&#x8272;
  app.get(&apos;/api/space/listUserRole&apos;, &apos;api.space.listUserRole&apos;);
  app.post(&apos;/api/space/addApp&apos;, &apos;api.space.addApp&apos;);
  app.post(&apos;/api/space/listApp&apos;, &apos;api.space.listApp&apos;);
  //&#x673A;&#x6784;&#x4E0B;&#x7528;&#x6237;App
  app.get(&apos;/api/space/listUserApp&apos;, &apos;api.space.listUserApp&apos;);

  //role &#x63A5;&#x53E3;&#x8DEF;&#x7531;
  app.resources(&apos;role&apos;, &apos;/api/role&apos;, &apos;api.role&apos;);
  app.post(&apos;/api/role/addUserRole&apos;, &apos;api.role.addUserRole&apos;);
  //&#x83B7;&#x53D6;&#x7528;&#x6237;&#x89D2;&#x8272;&#xFF0C;&#x4ECE;&#x7528;&#x6237;&#x89D2;&#x8272;&#x5217;&#x8868;&#x4E2D;&#x7B5B;&#x9009;
  app.get(&apos;/api/role/listUserRole&apos;, &apos;api.role.listUserRole&apos;);
  app.post(&apos;/api/role/addPermit&apos;, &apos;api.role.addPermit&apos;);
  //&#x4ECE;&#x89D2;&#x8272;&#x8BB8;&#x53EF;&#x5217;&#x8868;&#x4E2D;&#x7B5B;&#x9009;
  app.get(&apos;/api/role/listPermit&apos;, &apos;api.role.listPermit&apos;);

  //permit &#x63A5;&#x53E3;&#x8DEF;&#x7531;
  app.resources(&apos;permit&apos;, &apos;/api/permit&apos;, &apos;api.permit&apos;);
  app.post(&apos;/api/permit/addRole&apos;, &apos;api.permit.addRole&apos;);
  //&#x4ECE;&#x89D2;&#x8272;&#x8BB8;&#x53EF;&#x5217;&#x8868;&#x4E2D;&#x7B5B;&#x9009;
  app.get(&apos;/api/permit/listRole&apos;, &apos;api.permit.listRole&apos;);
  //&#x83B7;&#x53D6;&#x7528;&#x6237;&#x7684;&#x8BB8;&#x53EF;&#xFF0C;&#x53EF;&#x4EE5;&#x662F;&#x67D0;&#x4E2A;&#x89D2;&#x8272;&#x7684;&#xFF0C;&#x6216;&#x8005;&#x67D0;&#x4E2A;app&#x7684;
  app.get(&apos;/api/permit/listUserPermit&apos;, &apos;api.permit.listUserPermit&apos;);

  //app &#x63A5;&#x53E3;&#x8DEF;&#x7531;
  app.resources(&apos;app&apos;, &apos;/api/app&apos;, &apos;api.app&apos;);
  app.post(&apos;/api/app/addPermit&apos;, &apos;api.app.addPermit&apos;);
  //&#x4ECE;&#x89D2;&#x8272;&#x8BB8;&#x53EF;&#x5217;&#x8868;&#x4E2D;&#x7B5B;&#x9009;
  app.get(&apos;/api/app/listPermit&apos;, &apos;api.app.listPermit&apos;);
  

};
</code></pre>

</div>

<footer class="footer">
  Generated by <a href="https://esdoc.org">ESDoc<span data-ice="esdocVersion">(0.5.2)</span><img src="./image/esdoc-logo-mini-black.png"></a>
</footer>

<script src="script/search_index.js"></script>
<script src="script/search.js"></script>
<script src="script/pretty-print.js"></script>
<script src="script/inherited-summary.js"></script>
<script src="script/test-summary.js"></script>
<script src="script/inner-link.js"></script>
<script src="script/patch-for-local.js"></script>
</body>
</html>
